{% extends "base_detail.html" %}

{% load i18n %}
{% load breadcrumbs %}
{% load avatar %}
{% load menu %}
{% load details %}

{% block breadcrumbs %}
    {% add_crumb 'Home' '/' %}
    {% add_crumb 'Users' 'user_list' %}
    {% add_crumb object %}
{% endblock %}

{% block objectactions %}
{% if perms.auth.add_user %}
<li class="add"><a title="{% trans 'Add' %}" href="{% url user_add %}">{% trans 'Add' %}</a></li>
{% endif %}
{% if object.pk in obj_perms.auth.change_user %}
<li class="edit"><a title="{% trans 'Edit' %}" href="{% url user_edit object.username %}">{% trans 'Edit' %}</a></li>
{% endif %}
{% if object.pk in obj_perms.auth.delete_user %}
<li class="delete"><a title="{% trans 'Delete' %}" href="{% url user_delete object.username %}">{% trans 'Delete' %}</a></li>
{% endif %}
{% if perms.auth.view_user %}
<li class="all"><a title="{% trans 'All' %}" href="{% url user_list %}">{% trans 'All' %}</a></li>
{% endif %}
{% endblock %}

{% block objectmenu %}{% menu "user_profile_menu" %}{% endblock %}

{% block section %}
<div class="details">
    {% avatar object 90 %}
    <table class="properties">
        {% property_table object "[['full_name', 'is_active'], ['is_staff', 'is_superuser'], ['date_joined', 'last_login']]" %}
        {% property_table object.get_profile "[['language', 'timezone']]" %}
        {% property_table object "['groups']" %}
    </table>
</div>
{% endblock %}
